package admin

import (
	"github.com/gin-gonic/gin"
	"go-api-template/api/http"
	"go-api-template/api/http/v1/admin/user"
)

func setUserApi(r *gin.RouterGroup) {
	rg := r.Group("/user")

	{
		rg.POST("/list", http.Handle(&user.ListReq{}))
		rg.POST("/save", http.Handle(&user.SaveReq{}))
		rg.POST("/delete", http.Handle(&user.DeleteReq{}))
		rg.GET("/online/list", http.Handle(&user.OnlineListReq{}))
		rg.POST("/setAdmin", http.Handle(&user.SetAdminReq{}))
		rg.POST("/setRole", http.Handle(&user.SetRoleReq{}))
	}
}
